# -*- coding: utf-8 -*-
import unittest
from tools.HTMLTestRunner import HTMLTestReportCN
from common.base import *
from pages.test_login import *

base_url = os.path.abspath('.')
suite = unittest.TestSuite()

if __name__ == '__main__':

    # 执行用例
    print("#####################################################")
    runner = unittest.TextTestRunner()

    testcase1 = [TestLogin('test_login')]
    suite.addTests(testcase1)

    # 生成测试报告
    with open(base_url + '/logs/report.html', 'wb') as f:
        HTMLTestReportCN(
            stream=f,
            verbosity=2,
            title='测试报告',
            tester=''
        ).run(suite)
    # runner.run(suite)
    print("#####################################################")
